﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminPortal.master" AutoEventWireup="true" CodeBehind="SetMenuToUser.aspx.cs" Inherits="Garlic.SystemManagement.SetMenuToUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <!--工具栏-->
    <cc1:GeneralToolBar ID="TopToolBar" runat="server" CommandBarString="保存|Save|save.gif;展开/隐藏查询|Hide|icon-collapse.png|SetVisibility('divSearch');查询|Search|Icon-Search.png"
        IconURI="~/images/icon" CssClass="ToolBar" OnOnClick="TopToolBar_OnClick" />
    <%--<div id="divSearch" runat ="server">
        <table class="Search">
            <tr>
                <td class="SearchHeader">
                    菜单名：</td>
                <td>
                    <asp:TextBox ID="searchMenuName" runat="server" /></td>
                <td class="SearchHeader">
                    上级菜单：</td>
                <td>
                    <asp:DropDownList runat="server" ID="searchParentMenu" ></asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>--%>
    请管理在 <span id="roleName" runat="server" /> 角色中的菜单：<asp:HiddenField ID="hdRoleID" runat="server" />
    <!--查询结果列表-->
    <yyc:SmartGridView ID="SmartGrid" runat="server" AutoGenerateColumns="False" AllowSorting="True"
        DataKeyNames="Menu_id" Width="100%" CssClassMouseOver="OverRow" AllowPaging="True"
        DataSourceID="SmartDataViewSource"  OnRowDataBound="SmartGrid_RowDataBound" CheckAllID="checkall" CheckItemID="checkitem">
        <Columns>
            <asp:TemplateField>
                <headertemplate>
                    <asp:checkbox id="checkall" runat="server" />
                <asp:HiddenField ID="hf_iseffect" runat="server" Value='<%#Eval("Is_Effective") %>' />
</headertemplate>
                <itemstyle width="18px" />
                <headerstyle width="18px" />
                <itemtemplate>
                    <asp:checkbox id="checkitem" runat="server" />
</itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="菜单名" SortExpression="Menu_name">
                <headerstyle width="70px" />
                <itemtemplate>
<a href='SetMenuToRole.aspx?RoleID=<%= hdRoleID.Value %>&parentMenuID=<%# Eval("Menu_id") %>&parentMenuName=<%# Eval("Menu_name") %>'><%# Eval("Menu_name") %></a>
</itemtemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Parent_menu_id" HeaderText="上级菜单" SortExpression="Parent_menu_id" >
                <headerstyle width="70px" />
            </asp:BoundField>
            <asp:BoundField DataField="Link_url" HeaderText="链接地址" SortExpression="Link_url" >
                <headerstyle width="70px" />
            </asp:BoundField>
            <asp:BoundField DataField="Image_url" HeaderText="图标地址" SortExpression="Image_url" >
                <headerstyle width="70px" />
            </asp:BoundField>
            <asp:BoundField DataField="Order_id" HeaderText="排序号" SortExpression="Order_id" >
                <headerstyle width="70px" />
            </asp:BoundField>
            <asp:BoundField DataField="Comments" HeaderText="备注" SortExpression="Comments" >
                <headerstyle width="70px" />
            </asp:BoundField>
        </Columns>
        <SortTip SortAscImage="~/Images/icon/asc.gif" SortDescImage="~/Images/Icon/desc.gif"
             />
        
        <PagerSettings Position="TopAndBottom" FirstPageText="&lt;font face='webdings'&gt;9&lt;/font&gt;"
            PreviousPageText="&lt;font face='webdings'&gt;3&lt;/font&gt;" NextPageText="&lt;font face='webdings'&gt;4&lt;/font&gt;"
            LastPageText="&lt;font face='webdings'&gt;:&lt;/font&gt;" />
        
    </yyc:SmartGridView>
    &nbsp;&nbsp;
    <asp:ObjectDataSource ID="SmartDataViewSource" runat="server" SortParameterName="orderText"
        SelectMethod="GetList_User" TypeName="Garlic.BLL.MenuManager">
        <SelectParameters>
            <asp:Parameter Name="textWhere" Type="String" DefaultValue="" />
            <asp:Parameter Name="orderText" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
